<template>
  <div class="docker">
    <div
      :class="{ 'docker__item--active': index === 0 }"
      class="docker__item"
      :key="item.icon"
      v-for="(item, index) in dockerList"
    >
      <div class="iconfont" v-html="item.icon"></div>
      <div class="docker__title">{{ item.text }}</div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Docker',
  setup () {
    const dockerList = [
      { icon: '&#xe867;', text: '首页' },
      { icon: '&#xe7e5;', text: '购物车' },
      { icon: '&#xe713;', text: '订单' },
      { icon: '&#xe600;', text: '我的' }
    ]
    return { dockerList }
  }
}
</script>
<style lang="scss" scoped>
@import '../../style/viriables.scss';
.docker {
  display: flex;
  position: absolute;
  padding: 0 0.18rem;
  box-sizing: border-box;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 0.49rem;
  border-top: 0.01rem solid $content-bgcolor;
  &__item {
    flex: 1;
    text-align: center;
    .iconfont {
      font-size: 0.18rem;
      margin: 0.07rem 0 0.02rem 0;
    }
    .docker__title {
      font-size: 0.2rem;
      transform: scale(0.5, 0.5);
      transform-origin: center top;
    }
    &--active {
      color: #1fa4fc;
    }
  }
  color: $content-fontcolor;
}
</style>
